package cn.duli.myvideo.service.Impl;

import cn.duli.myvideo.mapper.VarietyMapper;
import cn.duli.myvideo.pojo.Variety;
import cn.duli.myvideo.service.VarietyService;
import com.github.pagehelper.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class VarietyServiceImpl implements VarietyService {

    @Resource
    private VarietyMapper varietyMapper;

    @Override
    public List<Variety> queryLike(String vName) {
        return varietyMapper.queryLike(vName);
    }

    @Override
    public Page<Variety> findAll() {
        return varietyMapper.findAll();
    }

    @Override
    public Variety findById(Integer vId) {
        return varietyMapper.findById(vId);
    }

    @Override
    public void save(Variety variety) {
        varietyMapper.save(variety);
    }

    @Override
    public void update(Variety variety) {
        varietyMapper.update(variety);
    }

    @Override
    public void deleteById(Integer vId) {
        varietyMapper.deleteById(vId);
    }
}
